/*
 *	The temperature program prints Celsius-Fahrenheit table for
 *	fahr = -50, -40, ..., 150
 *	Copyright (C) 1989-2089 Sergey Sergeevich Tsybanov All Rights Reserved
 *
 *	Temperature is free software: you can redistribute it and/or modify 
 *	it under the terms of the GNU General Public License as published 
 *	by the Free Software Foundation, either version 3 of the License, 
 *	or (at your option) any later version.
 *
 *	Temperature is distributed in the hope that it will be useful, but 
 *	WITHOUT ANY WARRANTY; without even the implied warranty of 
 *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
 *	See the GNU General Public License for more details.
 *
 *	You should have received a copy of the GNU General Public License 
 *	along with the temperature program. 
 *	If not, see <https://www.gnu.org/licenses/>.
 */

#include <stdio.h>

/*
 *	Print Celsius-Fahrenheit table for fahr = -50, -40, ..., 150
 */
int main( void)
{
	double celsius, fahrenheit;
	double lowest, highest, step;

	lowest = -50; highest = 150; step = 10;

	celsius = lowest;

	printf( "%s\n%s\n%s\n%s\n%s\n",
		"=====================",
		"= Temperature Conv. =",
                "=====================",
                "== Co  =======  Fo ==",
		"=====================");
	while ( celsius <= highest ) {
		fahrenheit = 9.0 / 5 * celsius + 32;
		printf( "%6.0f\t%10.3f\n", celsius, fahrenheit);
		celsius = celsius + step;
	}

	return 0;
}